
if CLIENT then

BMPlist = {}
BMPlist.bmp = {}


-------------------------------------------------------
--Name: BMPlist:Init()
--Initialization
-------------------------------------------------------

function BMPlist:Init()
	
end

-------------------------------------------------------
--Name: BMPlist:ZrobSieDobrze()
--Zrobia sie dobrze
-------------------------------------------------------

function BMPlist:ZrobSieDobrze()
    
	self.JestZrobioneDobrze = true
	
	self.bmp={}
	
	local sizeX, sizeY = self:GetSize()
	
	self.scroll = vgui.Create( "DVScrollBar", self )
	self.scroll:SetSize( 16, sizeY)
	self.scroll:SetPos(sizeX - 16, 0)
	self.scroll:SetUp(sizeY, table.Count(self.bmp or {})*60+2)
	
end

-------------------------------------------------------
--Name: BMPlist:Paint()
--Paint
-------------------------------------------------------

function BMPlist:Paint()
    
	if not self.JestZrobioneDobrze then return end
	
	local sizeX, sizeY = self:GetSize()
	
	draw.RoundedBox( 8, 0, 0, sizeX - 16, sizeY, Color(100,100,100,255) )
	
	local I=0
	local offset = self.scroll:GetOffset()
	for k, v in pairs(self.bmp) do
		
		if I*60+offset > -60 and I*60+offset < sizeY then self:PaintNode(I*60+offset, sizeX, k, v) end
		I=I+1
	end
	
    return true;
end

-------------------------------------------------------
--Name: BMPlist:PaintNode()
--Paint one node
-------------------------------------------------------

function BMPlist:PaintNode(n, sizeX, k, v)

	draw.RoundedBox( 8, 2, n+2, sizeX - 18, 57, Color(200,200,200,255))
	
end

-------------------------------------------------------
--Name: BMPlist:OnMousePressed()
--
-------------------------------------------------------

function BMPlist:OnMousePressed( MC )
    
end

-------------------------------------------------------
--Name: BMPlist:OnCursorMoved()
--
-------------------------------------------------------

function BMPlist:OnCursorMoved(X, Y)
    
end

-------------------------------------------------------
--Name: BMPlist:OnMouseReleased()
--
-------------------------------------------------------

function BMPlist:OnMouseReleased( MC )

end

vgui.Register( "BMPlist", BMPlist, "DPanel");

end